import Vue from "vue";
import VueRouter from "vue-router";
import Login from './components/Login.vue'
import Welcome from './components/Welcome.vue'


// 要告诉 vue 使用 vueRouter
Vue.use(VueRouter);

const routes = [
    {
        path:"/Login",
        component: Login
    },
    {
        path:"/",
        component: Welcome,
        children:[{
            path:'userManage',
            component:resolve=>require(['./components/userManage'],resolve)
        },{
            path:'command',
            component:resolve=>require(['./components/command'],resolve)
        }]
    },
]

var router =  new VueRouter({ 
    routes
})
export default router;